package utils

import (
	"io"
	"net/http"
)

func CloseBody(resp *http.Response) {
	if resp != nil {
		resp.Body.Close()
	}
}

func DrainRespBody(resp *http.Response) {
	if resp == nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(io.Discard, resp.Body)
}
